## Makefile to the simulation

# Flags
CXX = g++
CXX_CFLAGS = -Wall -O2 -ggdb -ID:\dev\include
CXX_LDFLAGS = -LD:\dev\lib -lgsl -lgslcblas -lm

# Files and dependencies
creditChains: main.o Environment.o Firm.o Bank.o
	$(CXX) $(CXX_CFLAGS) $^ -o $@ $(CXX_LDFLAGS)

main.o: main.cpp Environment.o
	$(CXX) $(CXX_CFLAGS) -c main.cpp -o $@

Environment.o: Environment.cpp Environment.h Firm.o Bank.o
	$(CXX) $(CXX_CFLAGS) -c Environment.cpp -o $@

Firm.o: Firm.cpp Firm.h
	$(CXX) $(CXX_CFLAGS) -c Firm.cpp -o $@

Bank.o: Bank.cpp Bank.h
	$(CXX) $(CXX_CFLAGS) -c Bank.cpp -o $@

clean:
	rm -f *.o

# Info to CodeBlocks
Release: creditChains
Debug: creditChains
